import axios from 'axios'

/*查询物资分类*/
export const  getCategory= () => {
  return axios({
    url: '/api/productCategory/getList',
    method: 'get',
  })
}

// 新增菜单
export function addMenu (category) {
  return axios({
    url: '/api/productCategory/addCategory',
    method: 'post',
    data: category
  })
}

// 修改菜单
export function updateMenu (category) {
  return axios({
    url: '/api/productCategory/updateCategory',
    method: 'put',
    data: category
  })
}

// 删除菜单
export function delMenu (id) {
  return axios({
    url: '/api/productCategory/delCategory',
    method: 'delete',
    params: {
      id,
    },
  })
}
